<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Regular expression match with multibyte support</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-ereg-search.html">mb_ereg_search</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mb-eregi-replace.html">mb_eregi_replace</a></div>
 <div class="up"><a href="ref.mbstring.html">多字节字符串 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.mb-ereg" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_ereg</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5)</p><p class="refpurpose"><span class="refname">mb_ereg</span> &mdash; <span class="dc-title">Regular expression match with multibyte support</span></p>

 </div>
   
 <div class="refsect1 description" id="refsect1-function.mb-ereg-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>mb_ereg</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$pattern</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$string</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$regs</code></span>
  ] )</div>

  <p class="simpara">
   Executes the regular expression match with multibyte support.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-ereg-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">pattern</code></em></dt>

     <dd>

      <p class="para">
       The search pattern.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">string</code></em></dt>

     <dd>

      <p class="para">
       The search <span class="type"><a href="language.types.string.html" class="type string">string</a></span>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">regs</code></em></dt>

     <dd>

      <p class="para">
       Contains a substring of the matched <span class="type"><a href="language.types.string.html" class="type string">string</a></span>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.mb-ereg-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="simpara">
   Executes the regular expression
   match with multibyte support, and returns <em>1</em> if matches are found.
   If the optional <em><code class="parameter">regs</code></em> parameter was specified, the function
   returns the byte length of matched part, and the <span class="type"><a href="language.types.array.html" class="type array">array</a></span>
   <em><code class="parameter">regs</code></em> will contain the substring of matched
   string. The function returns <em>1</em> if it matches with the empty
   string. If no matches are found or an error happens, <strong><code>FALSE</code></strong> will be
   returned.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.mb-ereg-notes">
  <h3 class="title">注释</h3>
  
  <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"><span class="function"><a href="function.mb-regex-encoding.html" class="function">mb_regex_encoding()</a></span>
指定的内部编码或字符编码将会当作此函数用的字符编码。</p></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-ereg-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.mb-regex-encoding.html" class="function" rel="rdfs-seeAlso">mb_regex_encoding()</a> - Set/Get character encoding for multibyte regex</span></li>
    <li class="member"><span class="function"><a href="function.mb-eregi.html" class="function" rel="rdfs-seeAlso">mb_eregi()</a> - Regular expression match ignoring case with multibyte support</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mb-ereg-search.html">mb_ereg_search</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mb-eregi-replace.html">mb_eregi_replace</a></div>
 <div class="up"><a href="ref.mbstring.html">多字节字符串 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
